package com.androidsocketd.util;

import android.util.Log;

import com.androidsocketd.bean.Post;
import com.androidsocketd.bean.PostBean;

/**
 * Created by yao on 2021/3/25.
 * Describe
 */

public class ClonePostUtil {


    public static PostBean ClonePost(Post post, PostBean postBean) {
//        private String recordId;
//        private String weighingTime;
//        private String gridName;
//        private String gridType;
//        private String weighingType;
//        private String totalWeight;

//        private String partsWeight;
//        private String actualWeight;
//        private String qualifiedType;

//        private String classes;
//        private String workTeam;
//        private String staff;

//        private String machineCode;
//        private String instrument;
//        private String memo;

        try {

            postBean.setRecordId(post.getRecordId());
            postBean.setWeighingTime(post.getWeighingTime());
            postBean.setGridName(post.getGridName());

            postBean.setGridType(post.getGridType());
            postBean.setWeighingType(post.getWeighingType());
            postBean.setTotalWeight(post.getTotalWeight());

            postBean.setPartsWeight(post.getPartsWeight());
            postBean.setActualWeight(post.getActualWeight());
            postBean.setQualifiedType(post.getQualifiedType());

            postBean.setClasses(post.getClasses());
            postBean.setWorkTeam(post.getWorkTeam());
            postBean.setStaff(post.getStaff());

            postBean.setMachineCode(post.getMachineCode());
            postBean.setInstrument(post.getInstrument());
            postBean.setMemo(post.getMemo());
        } catch (Exception e) {
            Log.d("CLONE ERROR ==:", e.toString());
        }

        return postBean;
    }
}
